package cn.jiyun.controller;


import cn.jiyun.service.StoreService;
import com.jiyun.common.pojo.product.Store;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/store")
@CrossOrigin
public class StoreController {
    @Autowired
    private StoreService storeService;
    @GetMapping("/findAll")
    public List<Store> findAll(){
        List<Store> storeList = storeService.findAll();
        return storeList;
    }
}
